package main

import (
	"bytes"
	"fmt"
	"log"
	"os/exec"
)

func main() {
	commandStr := "conda activate stepaudio && python E:/temp/2/social-auto-upload/cli_main.py douyin dykj6f3pcctp upload \"E:/temp/download/liangyabang/content/fengqichanglin/segmentation/第21集/第21集_0.mp4.mp4\" -pt 0"
	cmd := exec.Command("cmd", "/C", commandStr)
	var stdout, stderr bytes.Buffer
	cmd.Stdout = &stdout // 标准输出
	cmd.Stderr = &stderr // 标准错误
	err := cmd.Run()
	outStr, errStr := string(stdout.Bytes()), string(stderr.Bytes())
	fmt.Printf("out:\n%s\nerr:\n%s\n", outStr, errStr)
	if err != nil {
		log.Fatalf("cmd.Run() failed with %s\n", err)
	}
}
